<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="shortcut icon" href="Icons/scicon.png">
<link rel="stylesheet"
	href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">

<!-- Optional theme -->
<link rel="stylesheet"
	href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css">

<!-- Latest compiled and minified JavaScript -->
<script
	src="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
	<link href="Styles/signin.css" rel="stylesheet">
<title>Login</title>
</head>
<body>
	<div class="container">
	<form class="form-signin" role="form" action="LoginServlet" method="post" enctype="multipart/form-data">
	<img src="Images/logoSmartContext.png" width="70%" height="70%" style="display: block;margin: auto;">
	<%
		if(request.getQueryString()!=null){
			String errType = request.getParameter("Err");
			if(errType.equals("1")){
				out.println("<p style=\"color:maroon\">*Complete the fields*</p>");
			}
			if(errType.equals("2")){
				out.println("<p style=\"color:maroon\">*Invalid credentials*</p>");
			}
			
			if(errType.equals("3")){
				out.println("<p style=\"color:maroon\">*Session timeout*</p>");
			}
		}
	%>
	<input type="text" name="username" class="form-control" placeholder="Your username" required autofocus>
	<input type="password" name="password" class="form-control" placeholder="Password" required>
	<br>
	<button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
	<br>
	<a href="register.jsp">Are you a new user?</a>
	<br>
	<a href="">Forgot your password?</a>
	</form>
	</div>
</body>
</html>